package com.xmy.cultivate.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 课程商品表
 * </p>
 *
 * @author hpiggy
 * @since 2023-05-29
 */
@ApiModel(value = "Shopping对象", description = "课程商品表")
@Data
public class Shopping implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String name;

    private Integer yearPart;

    private Integer quarterNum;

    private Long schoolId;

    private Integer yearClassId;

    @TableField(exist = false)
    private String shoolName;

    private Long courseId;

    @TableField(exist = false)
    private String courseName;

    private Long gradeId;

    @TableField(exist = false)
    private String gradeName;

    private Integer status;

    private Integer residueNum;

    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("创建人")
    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(exist = false)
    private List<ShoppingDiscounts> shoppingDiscountsList;

    @TableField(exist = false)
    private Grade grade;

    @TableField(exist = false)
    private Course course;

    @TableField(exist = false)
    private BigDecimal coursePrice;
}
